﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using LeadVinaglue.Models;

namespace LeadVinaglue.Repository
{
    public class RoleRepository
    {
        LeadVinaglueEntities entities = new LeadVinaglueEntities();

        public List<RoleModel> GetAllRoles()
        {
            return (from c in entities.Roles
                    select new RoleModel
                    {
                        ID = c.ID,
                        Name = c.Name,
                        ShortDescription = c.ShortDescription,
                        LongDescription = c.LongDescription,
                        Editor = (c.Name != "SuperAdministrator")
                    }).ToList();
        }
    }
}